The invention pertains to machine vision and, more particularly, to the morphological transformation of images, e.g., via dilation and erosion, with zero or other uniform offsets.
The human mind is uncannily adept at identifying patterns in images. It readily distinguishes between foreground and background, as well as among objects in either. Thus, even those young of years or lacking in mental capacity are capable of distinguishing the outreached hand from the scowling face.
What comes to the mind so easily can be painstakingly difficult to teach a computer. Machine vision is one example. Software engineers have long labored to program these machines to identify objects in digital images. Though their efforts have paid off, the going has been slow. It is fair to estimate that billions of lines of code have been thrown out in the effort.
The early machine vision programs used special purpose algorithms to solve each new programming challenge. This practice was abandoned as modular programming came to the fore. Software engineering, in general, and machine vision, in particular, benefited from the new technique. Libraries were developed containing hundreds of small, "reusable" algorithms that could be invoked on a mix-and-match basis. Relying on these, software engineers were able to construct shorter, more reliable and more easily debugged programs for the image inspection tasks at hand.
Common to these libraries are the so-called dilation and erosion software "tools." These are used to emphasize or de-emphasize patterns in digital images and, thereby, to facilitate the recognition of objects in them. They are generally applied during image preprocessing, that is, prior to pattern recognition. As a result, they are referred to as morphological (or shape-based) transformation tools.
As its name implies, the dilation tool is used to enlarge features in an image. Roughly speaking, it does this by replacing each pixel (or point) in the image with its brightest neighbor. For example, if a given pixel has an intensity of 50 and one of its nearby neighbors has an intensity of 60, the value of the latter is substituted for the former. Application of this tool typically enlarges and emphasizes foreground surfaces, edges and other bright features.
The erosion tool does just the opposite. It de-emphasizes bright features by eroding their borders. Rather than replacing each pixel with its brightest neighbor, this tool replaces each with its dimmest, or least intense, neighbor. This can have the effect of diminishing bright foreground features, though, it is typically used to eliminate small imaging artifacts, such as those resulting from reflections, scratches or dust.
Prior art dilation and erosion tools are legion. A problem with many such tools, however, is that they cannot be readily adapted to compensate for a wide range of image-capture environments. One particular problem in this regard is poor illumination, which can result in an image so light or dark as to make pattern recognition difficult.
Although fast, accurate and flexible morphological vision tools are marketed by Cognex Corporation, the assignee hereof, there remains a need for still better such tools. Accordingly, an object of this invention is to provide improved machine vision systems and methods for morphological transformations that can compensate for varied image quality, e.g., by use of zero offsets, or other uniform offsets.
A still further object of the invention is to provide such systems and methods as provide for image dilation and erosion-using zero offsets or other uniform offsets.
A further object of the invention is to provide such systems as operate accurately and rapidly, yet, without requiring unduly expensive processing equipment or without undue consumption of resources.
A related object of the invention is to provide such systems as can be implemented on conventional digital data processors or other conventional machine vision analysis equipment, without excessive cost or difficulty.